package com.ny.mapper;

import com.ny.entity.Device;
import com.ny.entity.User;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
@Mapper
public interface DeviceMapper {
    //查询所有设备信息
    @Select("select * from device")
    public List<Device> findAllDevices();
    //根据设备名称查询设备信息
    @Select("SELECT * FROM device WHERE device_id = #{device_id}")
    List<Device> findDeviceByid(Integer device_id);
    //根据设备id删除设备信息
    @Delete("DELETE FROM device WHERE device_id = #{device_id}")
    int deleteDeviceById(Integer device_id);
}
